package org.linlinjava.litemall.db.service;

/**
 * @author zhy
 * @create 2018-10-08 16:28
 **/

import org.linlinjava.litemall.db.dao.SysRolePermMapper;
import org.linlinjava.litemall.db.domain.SysRolePerm;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class LitemallRolePermService {

	@Resource
	private SysRolePermMapper sysRolePermMapper;

    public int insertRolePerm(SysRolePerm sysRolePerm){
    	return sysRolePermMapper.insertSelective(sysRolePerm);
    }

    public void insertOne(Integer roleId,String permVal,Integer permType){
	    sysRolePermMapper.insertOne(roleId,permVal,permType);
    }
    public void deleteOne(Integer rids,Integer ptype,String pval){
    	sysRolePermMapper.deleteOne(rids,ptype,pval);
    }

    public void deleteByidPtype(Integer roleId,Integer ptype){
	    sysRolePermMapper.deleteByidPtype(roleId,ptype);
    }
}
